package com.example.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.entity.Information;
import com.example.entity.KHZM;
import com.example.entity.ZPerson;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.SelectKey;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author tyhxzy
 * @since 2023-11-03
 */
public interface InformationMapper extends BaseMapper<Information> {
    Information selectByid(Integer id);

    @Update("update information set name=#{customerName},province=#{province},bank=#{bank},ibank=#{ibank},bankaccount=#{bankAccount} where zid=#{zid}")
    //@Insert("insert into information (name,province,bank,ibank,bankaccount) values (#{customerName},#{province},#{bank},#{ibank},#{bankAccount})")
    @SelectKey(keyColumn = "id", keyProperty = "id", statement = "select last_insert_id()", before = false, resultType = Integer.class)
    int add(KHZM khzm);


    @Insert("insert into information (zid,status) values (#{zid},18)")
    int addZid(Integer zid);

@Update("update information set khzm=#{khzm} where zid=#{zid}")
    int addzIdCard(Information information);
}
